home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / itcl1_31.z / itcl1_31 / tcldev / itcl-1.3 / src / Makefile.in < prev    next >
Encoding:
Makefile  |  1993-10-15  |  6.8 KB  |  217 lines

  1. # ---------------------------------------------------------------------------
  2. #           [incr Tcl] - Object-oriented programming in Tcl
  3. # ---------------------------------------------------------------------------
  4. # This file is a Makefile for [incr Tcl].  If it has the name "Makefile.in"
  5. # then it is a template for a Makefile; to generate the actual Makefile,
  6. # run "./configure", which is a configuration script generated by the
  7. # "autoconf" program (constructs like "@foo@" will get replaced in the
  8. # actual Makefile.
  9. # ---------------------------------------------------------------------------
  10.  
  11. # ---------------------------------------------------------------------------
  12. # Things you can change to personalize the Makefile for your own site.
  13. # (You can make these changes in either Makefile.in or Makefile, but
  14. # changes to Makefile will get lost if you re-run the configuration script.)
  15. # ---------------------------------------------------------------------------
  16. # INSTALLATION DIRECTORIES
  17. # ---------------------------------------------------------------------------
  18.  
  19. # Top-level directory in which to install architecture-specific files:
  20. exec_prefix = /usr/local
  21.  
  22. # Directory in which to install the archive libitcl.a:
  23. LIB_DIR = $(exec_prefix)/lib
  24.  
  25. # Directory in which to install the programs (itcl_wish and itcl_sh):
  26. BIN_DIR = $(exec_prefix)/bin
  27.  
  28. # ---------------------------------------------------------------------------
  29. # COMPILATION SOURCES/LIBRARIES
  30. # ---------------------------------------------------------------------------
  31.  
  32. # Tcl source directory (must contain tclInt.h)
  33. # (the configure script should find it; if not, edit below)
  34. TCL_INC = -I@TCL_INCDIR@
  35.  
  36. # Tk include directory
  37. # (the configure script should find it; if not, edit below)
  38. TK_INC = -I@TK_INCDIR@
  39.  
  40. # X11 include directory
  41. # (the configure script should find it; if it is /usr/include,
  42. # it will be commented out)
  43. X11_INC =    @XINCLUDES@
  44.  
  45. # Tcl library
  46. # (the configure script should find it; if not, edit below)
  47. TCL_LIB = @TCL_LIBDIR@/libtcl.a
  48.  
  49. # Tk library
  50. # (the configure script should find it; if not, edit below)
  51. TK_LIB = @TK_LIBDIR@/libtk.a
  52.  
  53. # Linker switch(es) to use to link with the X11 library archive (the
  54. # configure script will try to set this value automatically, but you
  55. # can override it).
  56. X11_LIB = @XLIBSW@
  57.  
  58. # Libraries to use when linking:  must include at least Tk, Tcl, Xlib,
  59. # and the math library (in that order).  The "@LIBS@" part will be
  60. # replaced (or has already been replaced) with relevant libraries as
  61. # determined by the configure script.
  62. LIBS = $(TK_LIB) $(TCL_LIB) $(X11_LIB) @LIBS@ -lm
  63.  
  64. # Composite list of include files
  65. INCS = -I$(SRC_DIR) $(TCL_INC) $(TK_INC) $(X11_INC)
  66.  
  67. # To change the compiler switches, for example to change from -O
  68. # to -g, change the following line:
  69. CFLAGS = -O
  70.  
  71. # To turn off the security checks that disallow incoming sends when
  72. # the X server appears to be insecure, reverse the comments on the
  73. # following lines:
  74. SECURITY_FLAGS =
  75. #SECURITY_FLAGS = -DTK_NO_SECURITY
  76.  
  77. # To disable ANSI-C procedure prototypes reverse the comment characters
  78. # on the following lines:
  79. PROTO_FLAGS =
  80. #PROTO_FLAGS = -DNO_PROTOTYPE
  81.  
  82. # To enable memory debugging reverse the comment characters on the following
  83. # lines.  Warning:  if you enable memory debugging, you must do it
  84. # *everywhere*, including all the code that calls Tcl, and you must use
  85. # ckalloc and ckfree everywhere instead of malloc and free.
  86. MEM_DEBUG_FLAGS =
  87. #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
  88.  
  89. # Some versions of make, like SGI's, use the following variable to
  90. # determine which shell to use for executing commands:
  91. SHELL =        /bin/sh
  92.  
  93. # ---------------------------------------------------------------------------
  94. # The information below is modified by the configure script when Makefile
  95. # is generated from Makefile.in.  You shouldn't normally modify any of
  96. # this stuff by hand.
  97. # ---------------------------------------------------------------------------
  98.  
  99. AC_FLAGS =        @DEFS@
  100. INSTALL =        @INSTALL@
  101. INSTALL_PROGRAM =    @INSTALL_PROGRAM@
  102. INSTALL_DATA =        @INSTALL_DATA@
  103. RANLIB =        @RANLIB@
  104. SRC_DIR =        @srcdir@
  105. VPATH =            @srcdir@
  106.  
  107. # ---------------------------------------------------------------------------
  108. # The information below should be usable as is.  The configure script
  109. # won't modify it and you shouldn't need to modify it either.
  110. # ---------------------------------------------------------------------------
  111.  
  112. CC = @CC@
  113. CC_SWITCHES = $(CFLAGS) $(INCS) $(AC_FLAGS) $(PROTO_FLAGS) \
  114.     $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS)
  115.  
  116. SRCS = itcl_class.c itcl_core.c \
  117.     itcl_methods.c itcl_objects.c itcl_vars.c \
  118.     itcl_util.c
  119.  
  120. OBJS = itcl_class.o itcl_core.o \
  121.     itcl_methods.o itcl_objects.o itcl_vars.o \
  122.     itcl_util.o
  123.  
  124. SOBJS = itcl_class.so itcl_core.so \
  125.     itcl_methods.so itcl_objects.so itcl_vars.so \
  126.     itcl_util.so
  127.  
  128. all: @SHARED@ libitcl.a itcl_wish itcl_sh
  129.  
  130. libitcl.a: $(OBJS)
  131.     rm -f libitcl.a
  132.     ar cr libitcl.a $(OBJS)
  133.     $(RANLIB) libitcl.a
  134.  
  135. libitcl.so.$(VERSION): $(SOBJS)
  136.     rm -f libitcl.so.$(VERSION)
  137.     ld -o libitcl.so.$(VERSION) -assert pure-text $(SOBJS)
  138.  
  139. itcl_wish: tkAppInit.o libitcl.a
  140.     $(CC) $(CC_SWITCHES) tkAppInit.o libitcl.a $(LIBS) -o itcl_wish
  141.  
  142. itcl_sh: tclAppInit.o libitcl.a
  143.     $(CC) $(CC_SWITCHES) tclAppInit.o libitcl.a $(TCL_LIB) -lm -o itcl_sh
  144.  
  145. test: itcl_sh
  146.     @( echo cd $(SRC_DIR)/../tests\; source all\; exit ) | ./itcl_sh
  147.  
  148. pure: tclAppInit.o tkAppInit.o libitcl.a
  149.     purify $(CC) $(CC_SWITCHES) tclAppInit.o libitcl.a $(TCL_LIB) -lm \
  150.         -o itcl_sh.pure
  151.     purify $(CC) $(CC_SWITCHES) tkAppInit.o libitcl.a $(LIBS) \
  152.         -o itcl_wish.pure
  153.  
  154. install: @SHARED@ libitcl.a itcl_wish itcl_sh
  155.     @for i in $(LIB_DIR) $(BIN_DIR) ; \
  156.         do \
  157.         if [ ! -d $$i ] ; then \
  158.         echo "Making directory $$i"; \
  159.         mkdir $$i; \
  160.         chmod 755 $$i; \
  161.         else true; \
  162.         fi; \
  163.         done;
  164.     @echo "Installing libitcl.a"
  165.     @$(INSTALL_DATA) libitcl.a $(LIB_DIR)
  166.     @$(RANLIB) $(LIB_DIR)/libitcl.a
  167.     @echo "Installing shared (-pic) libitcl.a"
  168.     @$(INSTALL_DATA) libitcl.so.$(VERSION) $(LIB_DIR)
  169.     @echo "Installing itcl_wish"
  170.     @$(INSTALL_PROGRAM) itcl_wish $(BIN_DIR)
  171.     @echo "Installing itcl_sh"
  172.     @$(INSTALL_PROGRAM) itcl_sh $(BIN_DIR)
  173.  
  174. install-man:
  175.     @for i in $(MAN_DIR) $(MANN_DIR) ; \
  176.         do \
  177.         if [ ! -d $$i ] ; then \
  178.         echo "Making directory $$i"; \
  179.         mkdir $$i; \
  180.         chmod 755 $$i; \
  181.         else true; \
  182.         fi; \
  183.         done;
  184.     @cd $(SRC_DIR)/doc; for i in *.n; \
  185.         do \
  186.         echo "Installing doc/$$i"; \
  187.         rm -f $(MANN_DIR)/$$i; \
  188.         sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
  189.             $$i > $(MANN_DIR)/$$i; \
  190.         chmod 444 $(MANN_DIR)/$$i; \
  191.         done;
  192.  
  193. Makefile: $(SRC_DIR)/Makefile.in
  194.     $(SHELL) config.status
  195.  
  196. clean:
  197.     rm -f *.o *.a *.so *.so.* core errs *~ \#* TAGS *.E a.out errors
  198.     rm -f itcl_wish itcl_sh *pure*
  199.  
  200. distclean: clean
  201.     rm -f Makefile config.status
  202.  
  203. lint:
  204.     $(LINT) $(INCS) $(SRCS)
  205.  
  206. .c.o:
  207.     $(CC) -c $(CC_SWITCHES) $<
  208.  
  209. .SUFFIXES: .so $(SUFFIXES)
  210. .c.so:
  211.     $(CC) -c $(CC_SWITCHES) -pic -O $<
  212.     mv $*.o $@
  213.  
  214. $(OBJS): itcl_class.h itcl_core.h \
  215.     itcl_methods.h itcl_objects.h itcl_vars.h \
  216.     itcl_util.h
  217.